<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title></title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <link rel="shortcut icon" href="favicon.ico"> 
	<link href="__PUBLIC__/admin/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__PUBLIC__/admin/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="__PUBLIC__/admin/css/style.css?v=4.1.0" rel="stylesheet">
    <link href="__PUBLIC__/admin/css/double-date.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/uploadify/uploadify.css"/>
    <script src="__PUBLIC__/admin/js/jquery.min.js?v=2.1.4"></script>
    <script src="__PUBLIC__/admin/js/double-date.js"></script>
    <script type="text/javascript" charset="utf-8" src="__PUBLIC__/ueditor/ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="__PUBLIC__/ueditor/ueditor.all.js"> </script>
    <script type="text/javascript" charset="utf-8" src="__PUBLIC__/ueditor/lang/zh-cn/zh-cn.js"></script>
</head>

<script>
var filter = {$filter};
var pnum = {$pnum};

{if condition="(!isset($search)) OR (!$search)"}
var url = "/{$Request.module}/manage_cate/lst/filter/"+filter+".html?page="+pnum;
{else/}
var url = "/{$Request.module}/manage_cate/search.html?page="+pnum;
{/if}

var checkedUrl = "{:url('manage_cate/checked')}";
</script>

<body class="gray-bg">
<style>
input.error{
	border:1px solid red;
}
span.error{
	padding-top:10px;
	color: #f00;
	font-size:12px;
}
</style>

    <div class="wrapper wrapper-content">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>审核商家经营类目</h5>
                    </div>
                    <div class="ibox-content">
                        <form method="post" class="form-horizontal" id="form">
                            <div class="form-group">
                                <label class="col-sm-2 control-label">状态：</label>
                                <div class="col-sm-6">
                                    <div style="font-size:14px; width:500px; height:35px; line-height:35px;">
                                    <span style="color:#1c84c6;">待审核</span>
                                    </div>
                                </div>     
                            </div>
                            <div class="hr-line-dashed"></div>
                        
                            <div class="form-group">
                                <label class="col-sm-2 control-label">申请类目：</label>
                                <div class="col-sm-6">
                                    <div style="font-size:14px; width:500px; height:35px; line-height:35px;">{$manages.cate_name}</div>
                                </div>     
                            </div>
                            <div class="hr-line-dashed"></div>
                                                    
                            <div class="form-group">
                                <label class="col-sm-2 control-label">所属商家：</label>
                                <div class="col-sm-6">
                                    <div style="font-size:14px; width:500px; height:35px; line-height:35px;">{$manages.shop_name}</div>
                                </div>     
                            </div>
                            <div class="hr-line-dashed"></div>
                            
                            <div class="form-group">
                                <label class="col-sm-2 control-label">商家主营行业：</label>
                                <div class="col-sm-6">
                                    <div style="font-size:14px; width:500px; height:35px; line-height:35px;">{$manages.industry_name}</div>
                                </div>     
                            </div>
                            <div class="hr-line-dashed"></div>
                            
                            <div class="form-group">
                                <label class="col-sm-2 control-label">申请时间：</label>
                                <div class="col-sm-6">
                                    <div style="font-size:14px; width:500px; height:35px; line-height:35px;">{:date('Y-m-d H:i:s',$manages['apply_time'])}</div>
                                </div>     
                            </div>
                            <div class="hr-line-dashed"></div>
                            

		                     <div class="form-group" style="margin-top:50px;">
		                          <label class="col-sm-2 control-label">是否通过审核：</label>
		                          <div class="col-sm-6">
		                              <label class="radio-inline"><input type="radio" name="checked" value="1">是</label>
		                              <label class="radio-inline"><input type="radio" name="checked" value="2">否</label>
		                          </div>
		                     </div>
		                     <div class="hr-line-dashed"></div>
                           
                            <input name="id" type="hidden" value="{$manages.id}">
                                                 
                            <div class="form-group">
                                <div class="col-sm-4 col-sm-offset-2">
                                    <button class="btn btn-primary" type="button" id="doSubmit" style="margin-right:20px;">保存设置</button>
                                </div>
                            </div>
                            
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>


    <!-- 全局js -->
    <script src="__PUBLIC__/admin/js/bootstrap.min.js?v=3.3.6"></script>
    <!-- 自定义js -->
    <script type="text/javascript" src="__PUBLIC__/uploadify/jquery.uploadify.min.js"></script>
    <script src="__PUBLIC__/admin/js/plugins/layer/layer.min.js"></script>
    <script src="__PUBLIC__/admin/js/plugins/validate/jquery.validate.min.js"></script>	
    <!-- iCheck -->
    <script src="__PUBLIC__/admin/js/plugins/iCheck/icheck.min.js"></script>
    <script src="__PUBLIC__/admin/js/common/ajax.js"></script>

	<script>
    $(function(){ 
  	  $('#doSubmit').click(function(){
  		  var shcanshu = $('input:radio[name=checked]:checked').val();
  		  if(shcanshu == null){
  			  layer.msg('请选择审核通过或不通过', {icon: 2,time: 1000});
  			  return false;
  		  }
  			
  		  if('1,2'.indexOf(shcanshu) == -1){
  			  layer.msg('参数错误', {icon: 2,time: 1000});
  			  return false;
  		  }
  		  
  		  if(shcanshu == 1){
  			  var shuoming = '确定审核通过么？不可撤销';
  		  }
  		  
  		  if(shcanshu == 2){
  			  var shuoming = '确定审核不通过么？不可撤销';
  		  }
  		  
  		  layer.confirm(shuoming, {  			  
			  skin: 'layui-layer-molv',
			  closeBtn: 0,
			  shadeClose : true,
			  btn: ['确定','取消'] //按钮
		  },function(){
			  layer.load(2);
			  
		      $.ajax({
			      url:checkedUrl,
			      type:'POST',
			      data:$('#form').serialize(),
			      dataType:'json',
			      success:function(data){
			    	  if(data.status == 1){
			    		  layer.closeAll('loading');
			    		  layer.msg(data.mess, {icon: 1,time: 1000}, function(){
                               parent.location.href = url;
			    		  });
			    	  }else if(data.status == 0){
			    		  layer.closeAll('loading');
			    		  layer.msg(data.mess, {icon: 2,time: 1000});
			    	  }
			      },
			      error:function(){
			    	  layer.closeAll('loading');
			    	  layer.msg('操作失败，请重试', {icon: 2,time: 2000});
			      }
			  });
		  });
  	   });
   });
  	
   function cl(){
  	   parent.location.href = url;
   }
      
   </script>

</body>
</html>